<?php
class md_Addon_ContentServer extends md_Addon
{
	function	Name()
	{
		return 'ContentServer';
	}

	function	Action($Action)
	{
		$Result		=	array('Found' => true, 'Include' => '', 'IncludeMe' => '');
		
		if ( strcasecmp($Action,'upload') == 0 )
		{
			$Result['Include']	=	'addons/contentserver/upload.php';
		}
		elseif ( strcasecmp($Action,'downloadblocks') == 0 )
		{
			$Result['Include']	=	'addons/contentserver/downloadblocks.php';
		}
		elseif ( strcasecmp($Action,'login') == 0 )
		{
			$Result['Include']	=	'addons/contentserver/login.php';
		}
		elseif ( strcasecmp($Action,'reportbandwidthusage') == 0 )
		{
			$Result['Include']	=	'addons/shared/index.php';
			$Result['IncludeMe']=	'addons/contentserver/upload.php';
		}
		elseif ( strcasecmp($Action,'users') == 0 )
		{
			$Result['Include']	=	'addons/shared/index.php';
			$Result['IncludeMe']=	'addons/contentserver/users.php';
		}
		elseif ( strcasecmp($Action,'frontpage') == 0 ||
				 strcasecmp($Action,'') == 0 )
		{
			$Result['Include']	=	'addons/shared/index.php';
			$Result['IncludeMe']=	'addons/contentserver/frontpage.php';
		}
		else
		{
			$Result['Found']	=	false;
		}
		
		return $Result;	
	}
}

md_RegisterAddon(new md_Addon_ContentServer);

?>